# -*- coding: utf-8 -*-
from odoo import models, fields, api
from odoo.exceptions import ValidationError

class EmpLeaveCancel(models.Model):

    # 資料都是從leave_id帶出

    _name = 'emp.leavecancel'

    leave_id = fields.Many2one(string='取消的請(休)假單',comodel_name='emp.leave')

    pautono = fields.Char('人員電腦編號')
    year = fields.Char('年度')
    formno = fields.Char('請假單號')
    state = fields.Char('假單狀態')
    name = fields.Char('姓名')
    ptitle = fields.Char('職稱')
    dep = fields.Char('單位')
    code = fields.Char('請假人員工編號')
    type = fields.Char('假別')
    attach = fields.Char('假單附件別')
    reason = fields.Char('請假事由')
    vstart = fields.Char('請假起日')
    vend = fields.Char('請假迄日')
    vdays = fields.Char('請假天數')
    vhours = fields.Char('請假時數')
    created = fields.Char('建檔日期')
    remark = fields.Char('特殊說明')
    option1 = fields.Char('有無課')
    option2 = fields.Char('日間部課程')
    option3 = fields.Char('進修部課程')
    option4 = fields.Char('學生輔導時間')
    option5 = fields.Char('與亡者關係')
    option6 = fields.Char('死亡日期')
    option7 = fields.Char('附件其他說明')
    option8 = fields.Char('附件文號')
    option9 = fields.Char('懷孕月數')
    option10 = fields.Char('用掉補休時數')
    applyname = fields.Char('申請人')
    applyno = fields.Char('申請人員工編號')
    sess = fields.Char('學期')
    phome = fields.Char('電話')
    mobile = fields.Char('手機')
    agent = fields.Char('代理人姓名')
    sign_status = fields.Char('簽核狀態')
    status = fields.Char('表單狀態')
    agentpno = fields.Char('代理人員工編號')
    depno = fields.Char('請假人主要單位')
    depno2 = fields.Char('請假人第二單位')
    adminunit = fields.Char('主要單位')
    deplevel = fields.Char('請假人單位為一級或二級')
    admin = fields.Char()
    depkind = fields.Char('此部門是行政單位還是教學單位')
    istutor = fields.Char('是否為導師')
    formhours = fields.Char('應請幾時')
    compensate_reason = fields.Text('補休事由')
    form06_no = fields.Char('補休單號')
    form06_id = fields.Char('補休單流水號')
    baby_status = fields.Char('懷孕狀態(生產或流產)')
    cancel_apply_date = fields.Char()
    cancel_reason = fields.Text()
    cancel_apply_no = fields.Char()
    money = fields.Char('經費來源')